package edu.njfu.sas.dao;



import edu.njfu.sas.model.Student;

import java.sql.SQLException;
import java.util.List;

/**
 * 对student进行增删改查
 */
public interface StudentDao {
    //获取所有学生信息
    List<Student> getAllStudents() throws SQLException;
    //模糊获取学生信息
    List<Student> getStudentsByStr(String str) throws SQLException;
    //新建保存学生信息
    boolean saveStudent(Student s) throws SQLException;
    //通过学号获取学生信息
    Student getStudentByNo(String stuno) throws SQLException;
    //更新学生信息
    boolean updateStudent(Student s) throws SQLException;
    //按页数获取学生信息
    List<Student> getStudentsByPage(int currentPage, int pageSize) throws SQLException;
    //总学生数
    long totalRecords() throws SQLException;
    //删除学生
    boolean deleteStudent(String stuno) throws SQLException;

}
